home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Newton / Resources / Creative Digital Systems / PDADev32.sit / 07Besaha.txt < prev    next >
Encoding:
Text File  |  1995-02-20  |  11.7 KB  |  221 lines  |  [TEXT/R*ch]

  1. PenRight! Pro
  2. Bob Besaha
  3. Strong Software, Inc
  4. bbesaha@usa.net
  5.  
  6. ***************************************************************
  7. Copyright (c) 1995 by Creative Digital Inc. All rights reserved.
  8. ***************************************************************
  9.  
  10. Rating    4 (on a five-point scale)
  11. Pros    Quick runtime on 8086-compatible platforms. Easy to use
  12.         visual-programming tools for rapid prototyping. Free 800 number-based
  13.         technical support
  14. Cons    Runtime license fees. No documentation for target platforms. No
  15.         debugging versions of libraries. TSR-based runtime kernel consumes
  16.         100K of memory. Graffiti support not yet available. No tools provided
  17.         for data transfer to target platforms.
  18. Cost    $700 plus varying runtime license fees. 
  19.  
  20.         PenRight! Corporation
  21.         47358  Blvd., Fremont, CA 94538
  22.         510.249.6904, 510.249.6920
  23.  
  24.  
  25. PenRight! Pro is a software development toolkit that lets programmers create
  26. C-based software for many different MS-DOS based PDAs. It ships with three
  27. 3.5" diskettes and five manuals: API Reference Guide, Tools User's Guide,
  28. Learning Guide, PicturePak Sampler, and Application User's Guide. Together,
  29. these allow developers to create source code and resource files for pen-based
  30. applications. 
  31.     To actually generate executable files and deploy them on a PDA, you need
  32. several additional items:
  33.  
  34. * a C compiler (I use Borland C/C++ 4.5);
  35. * a file transfer mechanism to and from the PDA;
  36. * PenRight! runtime support files; and
  37. * extra disk storage on the PDA (PenRight Pro! runtimes ship on SunDisk
  38. PCMCIA Flash Disk Mass Storage System Cards).
  39.  
  40.     Applications written with the SDK run on IBM PCs and compatibles using
  41. the mouse as a pen substitute. This lets you do much of your editing,
  42. compiling, debugging on your desktop system. To deploy PenRight! applications
  43. on a target PDA, you have to buy a runtime file from PenRight. 
  44.  
  45. Why Yet Another Development Environment?
  46. PenRight Pro! runs on top of GEOS  and other DOS-based operating-system
  47. kernels. Unfortunately, the GEOS (and most other third-party) applications
  48. such as Graffiti are not available when running PenRight Pro!. Also,
  49. switching between the two environments wipes out data in the user's GEOS
  50. applications. In general, PenRight does not have a strong third-party
  51. applications development support. In exchange for these limitations, it
  52. offers several benefits to end user and developer. 
  53.     The user gets a much quicker runtime environment. This benefits vertical
  54. market applications such as field data collection, and is the primary reason
  55. why I chose PenRight Pro! for my medical software development. Early
  56. complaints about the Zoomer's speed were a strong, early obstacle to vertical
  57. market acceptance of that device. 
  58.     From the developer's perspective, PenRight Pro! has a significant
  59. advantage - it's designed specifically for data collection applications. The
  60. APIs are much sparser than GEOS' and oriented more towards application
  61. services than system services. This reduces both your learning curve and the
  62. amount of overhead you must manage in order to create a straightforward
  63. application. Ultimately, with all visual-style development products, there
  64. are trade-offs. These trade-offs are quite acceptable when a C programmer can
  65. produce a simple application in his or her first sitting with PenRight Pro!.
  66.     PenRight! is form-centric, designed to expedite the creation and use of
  67. data collection forms. The forms you create have the same look and feel that
  68. the visual development environment - flat and two-dimensional (see Figure 1).
  69. PenRight! takes the same no-frills, straightforward approach throughout. 
  70.  
  71. The PenRight Pro! APIs
  72. PenRight Pro! uses a common notational convention of prefixing the name of
  73. each source code function with three letters identifying the library the
  74. function or symbol belong to. At the highest level, the program provides
  75. Windowing, Database, Data Communications, Handwriting, and Forms libraries.
  76. There are also Field, Font, Control, Initialize/Terminate, List, and Cursor
  77. lower-level libraries.
  78.     Windows are the primary object for displaying and retrieving data. Window
  79. functions include modal and modeless windows, with and without adornments
  80. such as title bars and captions. If you like, you can manage windows at a
  81. very low-level. There are functions for activation, drawing, pen position
  82. detection, and clipping management. However, this degree of power adds to the
  83. complexity and time to development of an application. To simplify the
  84. developer's job, the windowing functions are used together with the
  85. Form-management library to expedite the development of dialog style windows.
  86.     Forms are stored as resources in a PenRight Pro! application. They are
  87. loaded, displayed, activated, and unloaded by the Form management functions.
  88. While forms can be created dynamically in source code, they are normally
  89. created with a separate SDK tool. 
  90.     Database functions and structures use dBase style files, including
  91. numeric, character, floating point, logical, date, and memo fields. Records
  92. are stored in database files and keyed with optional index files. PenRight
  93. Pro! provides additional structures and functions to move data between
  94. screens elements and database records.
  95.     Data communication functions include serial data transfer, including
  96. modem control, and several data transfer protocols, including XModem, YModem,
  97. and ZModem.
  98.     You can specify handwriting recognition for data entry fields, but there
  99. is also lower-level access at the source code level. While the company
  100. recommends that programmers rely on the built in handwriting recognition, the
  101. manuals acknowledge that certain tasks, such as limiting the set of
  102. recognizable characters to improve recognition accuracy, are important and
  103. are available. 
  104.     The handwriting recognition runs faster on PenRight Pro! sample
  105. applications than on GEOS programs. At first glance, the PenRight Pro!
  106. recognition seems slightly better than GEOS. Conversely, Graffiti is shipping
  107. for the GEOS environment, and PenRight is not yet compatible with Graffiti.
  108. This lack of Graffiti support clouds the otherwise clear choice of PenRight
  109. over GEOS for vertical application development.
  110.     PenRight! has a runtime component consisting of two Terminate and Stay
  111. Resident (TSR) DOS Programs, "pen!api.exe" and "pen!hwp.exe". The development
  112. software needs to use these files, so they are loaded first. It's wise to
  113. have as many of your other drivers in high memory as possible so that the two
  114. PenRight TSRs do not eat all your base DOS memory. Together, they use about
  115. 100K.
  116.  
  117. The Visual Tools
  118. The PenRight SDK comes with a coherent suite of visual tools that you use to
  119. create an application, including it's resource files, source code, and make
  120. files. The top level tool, PenRes, is the workbench that provides access to
  121. the other tools: the Form editor, Text editor, Canvas (graphics) editor, Font
  122. editor, and CodeStart. 
  123.     You lay out forms using the Form editor. Forms are essentially dialog
  124. boxes, plus additional objects for text display and entry, buttons, and
  125. lists. There are a variety of form controls and control options (there could
  126. be more). A feature that I particularly like in the Form editor is the
  127. ability to change the orientation of a form from Portrait to Landscape mode.
  128.     After laying out a form in Form edit, you use the workbench to run a
  129. consistency check to make sure that the application has all the required
  130. font, graphic, and text resources. This is a great time saver for anyone who
  131. has experience with missing resources in a Microsoft Windows SDK development
  132. cycle.
  133.     Next you use CodeStart to create the program's skeleton. CodeStart starts
  134. with an iconic display of all forms in a project (see Figure 2) plus a Start
  135. and Stop icon. You establish control flows between forms by clicking and
  136. dragging between them. If the first icon of a form contains several screen
  137. elements, such as push-buttons, CodeStart zooms up the full form so you can
  138. select which screen element to use as the source of the event for that
  139. particular link.
  140.     You can test applications from within CodeStart by selecting the
  141. Interpret Scripts command. Using this option you can find a lot of bugs
  142. before even uploading your program to your target PDA. This is a great time
  143. saver.
  144.  
  145. Code Generation
  146. Once you design your application, you generate its C source code and a
  147. compiler make file using a single menu command. Although the manuals mention
  148. earlier versions of the Borland compiler, the make file and source code
  149. compile perfectly with the latest shipping version (4.5) of Borland's C/C++
  150. compiler.
  151.     The C code generated is similar to the original APIs for Microsoft
  152. Windows. CodeStart produces C functions that are event handlers containing
  153. monolithic case statements. Here's a sample of the code generated by a very
  154. simple application with a single Exit button, shown in Figure 1.
  155.  
  156. /* FirstformHandleEvent */
  157. /*----------------------------------------------------------*/
  158. BOOLEAN FirstformHandleEvent (EVENTTYPE *event, 
  159.     WORD *error)
  160. {    BOOLEAN handled = FALSE;
  161.     *error = 0;
  162.     switch (GetObjectId (event))
  163.     {    case Exit:
  164.             handled = FirstformExitButtonHandler 
  165.                 (event, error);
  166.             break;
  167.     } return (handled);
  168. }
  169.  
  170. The FirstformExitButtonHandler is also a case statement:
  171.  
  172. /* FirstformExitButtonHandler */
  173. /*----------------------------------------------------------*/
  174. BOOLEAN FirstformExitButtonHandler (EVENTTYPE *event,         WORD *error)
  175. {    BOOLEAN handled = FALSE;
  176.     *error = 0;
  177.     switch (event->eType)
  178.     {    case ctlExitEvent:
  179.             Stop ();
  180.             break;
  181.     } return (handled);
  182. }
  183.  
  184.     Once you compile your application, you transfer it to a PDA. I have
  185. successfully used both a FlashDisk in an external drive unit on my PC and the
  186. data transfer software that comes with the GEOS SDK.
  187.  
  188. Documentation and Support
  189. The PenRight SDK comes with a Learning Guide that walks you through
  190. constructing two simple applications. Being new to PDA programming, my goal
  191. was to get the first sample running on my Zoomer. Unfortunately, the
  192. PenRight! Pro SDK includes absolutely no information on uploading to your
  193. PDA. Since PenRight! only recently began supporting GEOS-based PDAs, and a
  194. new version of their software is near completion, I expect to see more
  195. documentation about the target platforms in the next release.
  196.     The API Reference Guide is the heart of the documentation. It's thorough
  197. and full of code examples. There is a function and data structure reference,
  198. along with a solid overview section. 
  199.     The Tool User's Guide covers PenRes, Form Edit, and CodeStart. The manual
  200. includes a lot of stylistic information that can help you add a professional
  201. touch to your application's interface.
  202.     The documentation contains no reference literature for any specific PDA.
  203. I expect at least a bibliography or reference section directing me to the
  204. appropriate manufacturer's literature. In addition, I would like to see more
  205. information on what MS DOS support is available. 
  206.     The technical support I received from PenRight! Corporation made up for
  207. the lack of Zoomer specific literature. Getting the sample applications
  208. running took a brief call to PenRight. The PenRight support staff was very
  209. responsive - my questions were answered immediately - over an 800 number, to
  210. boot.
  211.  
  212. Summary
  213. PenRight Pro! is a development environment that provides an experienced
  214. MS-DOS C programmer a quick entry into the PDA development world. It includes
  215. visual editors for forms management, including layout, flow control, data
  216. validation, and source code generation. The resultant source code is easy to
  217. understand, and can be used as a framework for further programmer refinement.
  218. If your applications need to be developed quickly, and do not need access to
  219. the host environment on your target PDAs, PenRight Pro! provides a robust,
  220. fast, and complete solution.
  221.